package com.oot2d.entity;

import org.newdawn.slick.Animation;

public class Navi extends Entity {
    private float hover;

    public Navi()
    {
        super("navi", 16, 16, 1);

        hover = 0.0f;

        anims[0] = new Animation(sheet, 0, 0, 3, 0, true, 70, false);
        currAnim = anims[0];
    }

    //Navi gets her own update method so she can float and shit
    public void update(int d)
    {
        hover = (hover > (2 * Math.PI)) ? 0.0f : hover + 0.005f;

        //hover = (hover > (2 * Math.PI)) ? 0.0f : hover + (0.005f * d);

        y += (0.03 * Math.sin(hover));

        if (currAnim != null)
            currAnim.update(d);
    }

    public void draw()
    {
        if (currAnim != null)
            currAnim.draw(210.0f, 135.0f + y, width, height);
    }
}
